package cn.rentaotao.spring.jmx;

import org.springframework.jmx.export.annotation.ManagedAttribute;
import org.springframework.stereotype.Controller;

/**
 * @author rtt
 * @date 2022/5/25 14:53
 */
// @Controller
public class JmxController implements JmxService{

    public static final int DEFAULT_SIZE = 20;

    public int size = DEFAULT_SIZE;

    @Override
    @ManagedAttribute
    public int getSize() {
        return size;
    }

    @Override
    @ManagedAttribute
    public void setSize(int size) {
        this.size = size;
    }
}
